home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 25 / CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso / CUCD / Programming / ixemul / sdk / man / cat4 / inet.0 < prev    next >
Encoding:
Text File  |  1998-06-15  |  4.1 KB  |  90 lines

  1.  
  2. INET(4)                    UNIX Programmer's Manual                    INET(4)
  3.  
  4. NNAAMMEE
  5.      iinneett - Internet protocol family
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  9.      ##iinncclluuddee <<nneettiinneett//iinn..hh>>
  10.  
  11. DDEESSCCRRIIPPTTIIOONN
  12.      The Internet protocol family is a collection of protocols layered atop
  13.      the _I_n_t_e_r_n_e_t _P_r_o_t_o_c_o_l (IP) transport layer, and utilizing the Internet
  14.      address format.  The Internet family provides protocol support for the
  15.      SOCK_STREAM, SOCK_DGRAM, and SOCK_RAW socket types; the SOCK_RAW inter-
  16.      face provides access to the IP protocol.
  17.  
  18. AADDDDRREESSSSIINNGG
  19.      Internet addresses are four byte quantities, stored in network standard
  20.      format (on the VAX these are word and byte reversed).  The include file
  21.      <_n_e_t_i_n_e_t_/_i_n_._h> defines this address as a discriminated union.
  22.  
  23.      Sockets bound to the Internet protocol family utilize the following ad-
  24.      dressing structure,
  25.  
  26.            struct sockaddr_in {
  27.                    short   sin_family;
  28.                    u_short sin_port;
  29.                    struct  in_addr sin_addr;
  30.                    char    sin_zero[8];
  31.            };
  32.  
  33.      Sockets may be created with the local address INADDR_ANY to effect
  34.      ``wildcard'' matching on incoming messages.  The address in a connect(2)
  35.      or sendto(2) call may be given as INADDR_ANY to mean ``this host''. The
  36.      distinguished address INADDR_BROADCAST is allowed as a shorthand for the
  37.      broadcast address on the primary network if the first network configured
  38.      supports broadcast.
  39.  
  40. PPRROOTTOOCCOOLLSS
  41.      The Internet protocol family is comprised of the IP transport protocol,
  42.      Internet Control Message Protocol (ICMP), Transmission Control Protocol
  43.      (TCP), and User Datagram Protocol (UDP). TCP is used to support the
  44.      SOCK_STREAM abstraction while UDP is used to support the SOCK_DGRAM ab-
  45.      straction.  A raw interface to IP is available by creating an Internet
  46.      socket of type SOCK_RAW. The ICMP message protocol is accessible from a
  47.      raw socket.
  48.  
  49.      The 32-bit Internet address contains both network and host parts.  It is
  50.      frequency-encoded; the most-significant bit is clear in Class A address-
  51.      es, in which the high-order 8 bits are the network number.  Class B ad-
  52.      dresses use the high-order 16 bits as the network field, and Class C ad-
  53.      dresses have a 24-bit network part.  Sites with a cluster of local net-
  54.      works and a connection to the Internet may chose to use a single network
  55.      number for the cluster; this is done by using subnet addressing.  The lo-
  56.      cal (host) portion of the address is further subdivided into subnet and
  57.      host parts.  Within a subnet, each subnet appears to be an individual
  58.      network; externally, the entire cluster appears to be a single, uniform
  59.      network requiring only a single routing entry.  Subnet addressing is en-
  60.      abled and examined by the following ioctl(2) commands on a datagram sock-
  61.      et in the Internet domain; they have the same form as the SIOCIFADDR com-
  62.      mand (see intro(4)).
  63.  
  64.  
  65.  
  66.  
  67.      SIOCSIFNETMASK  Set interface network mask.  The network mask defines the
  68.                      network part of the address; if it contains more of the
  69.                      address than the address type would indicate, then sub-
  70.                      nets are in use.
  71.  
  72.      SIOCGIFNETMASK  Get interface network mask.
  73.  
  74. SSEEEE AALLSSOO
  75.      ioctl(2),  socket(2),  intro(4),  tcp(4),  udp(4),  ip(4),  icmp(4)
  76.  
  77.      "An Introductory 4.3 BSD Interprocess Communication Tutorial", _P_S_1, 7.
  78.  
  79.      "An Advanced 4.3 BSD Interprocess Communication Tutorial", _P_S_1, 8.
  80.  
  81. CCAAVVEEAATT
  82.      The Internet protocol support is subject to change as the Internet
  83.      protocols develop.  Users should not depend on details of the current
  84.      implementation, but rather the services exported.
  85.  
  86. HHIISSTTOORRYY
  87.      The iinneett protocol interface appeared in 4.2BSD.
  88.  
  89. 4.2 Berkeley Distribution        June 5, 1993                                2
  90.